home *** CD-ROM | disk | FTP | other *** search
- Path: info.uah.edu!oreo!gbacon
- From: gbacon@oreo (Greg Bacon)
- Newsgroups: comp.std.c
- Subject: Re: Help, best way to compare doubles
- Date: 13 Jan 1996 15:11:52 GMT
- Organization: The University of Alabama in Huntsville
- Message-ID: <4d8i3o$pjb@info.uah.edu>
- References: <4d1k09$aqq@mercury.IntNet.net>
- NNTP-Posting-Host: oreo.aspire.cs.uah.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jeff Tomich (jtomich@IntNet.net) wrote:
- : Having a hard time to figure out a function on how to compare doubles.
- : Any ideas?
-
- : thanks, Jeff
-
- No function necessary.. C has this really cool boolean equality operator
- that does this sort of thing for you. Have a look:
-
- {
- double a, b;
-
- if (a == b) {
- /* you know what to do */
- }
-
- Greg
- --
- Greg Bacon <gbacon@cs.uah.edu>
- University of Alabama in Huntsville
- CS Department Systems Support Team
-